package org.example.utils;

/**
 * TODO 描述.
 *
 * @author super-saya
 * @since 2025/9/20 04:21
 */
public class VerifyCodeUtils {
    //生成随机验证码，用于邮箱注册，5分钟内有效
    public static String generateVerifyCode(int length) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < length; i++) {
            int random = (int) (Math.random() * 10);
            sb.append(random);
        }
        return sb.toString();
    }

}
